package entidades;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name= "Remitos")
public class Remito implements Serializable{
	@Id
	private int id;
	@OneToMany(cascade=CascadeType.ALL)
	@JoinColumn(name="idRemito")
	private Set<Item> items=new HashSet<Item>();
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Set<Item> getItems() {
		return items;
	}
	public void setItems(Set<Item> items) {
		this.items = items;
	}
	public Remito(int id, Set<Item> items) {
		super();
		this.id = id;
		this.items = items;
	}
	public Remito() {
		super();
	}
	
}
